
package hasthi.wsdm;

import hasthi.common.HasthiException;

import javax.xml.namespace.QName;

/**
 * To add a operation to the capability, you must
 * <ol>
 *      <li>Define the operation in xmf.xml, with operation name, schema and Xml beans implementation class</li>
 *      <li>Add a operation to capability class with same operation name and accepting the XmlBeans class as the first parameter</li>
 * </ol>
 * 
 * There is no standard way to define the events supported by a capability. However it is recamnded to create a method sendEventXX() method that 
 * send the method and invoking it from your own code
 */

public interface Capability {
    public void init(ManagementAgentContext context,ManagableResource ownedResource,CapabilityDescription description) throws HasthiException;
    /**
     * This method get invoked when the resource is fully initalized. 
     * This can be used by capability, if it need to tap in to the system and find things e.g. Other capabilities  
     */
    public void parentResourceInitialized();
    public void setProperty(QName name,Object value) throws HasthiException;
    public Object getProperty(QName name) throws HasthiException;
    public CapabilityDescription getCapabilityDescription();
    public void stop();
}

